#include "document.h"
#include "visitor.h"

#include <iostream>

using namespace std;

Document::Document(void)
{
}

Document::~Document(void)
{
}

void Document::setName(const char* pName)
{
	m_sName = pName;
}

const char* Document::getName()
{
	return m_sName.c_str();
}

//////////////////////////////////////////////////////

BackupDoc::BackupDoc(void)
{
}

BackupDoc::~BackupDoc(void)
{
}

void BackupDoc::setVisitor(Visitor& visitor)
{
	visitor.visitBackupDoc(this);
}

void BackupDoc::operation1()
{
	cout<<"BackupDoc::operation1 is called."<<endl;
}

void BackupDoc::operation2()
{
	cout<<"BackupDoc::operation2 is called."<<endl;
}

//////////////////////////////////////////////////////

RestoreDoc::RestoreDoc(void)
{
}

RestoreDoc::~RestoreDoc(void)
{
}

void RestoreDoc::setVisitor(Visitor& visitor)
{
	visitor.visitRestoreDoc(this);
}

void RestoreDoc::operationA()
{
	cout<<"RestoreDoc::operation1 is called."<<endl;
}

void RestoreDoc::operationB()
{
	cout<<"RestoreDoc::operation2 is called."<<endl;
}
